Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 8 Forum

Notes/Domino 8 Forum

Previous Next

Option? LCConnection & Draft Script

Could something like this work? I see where the new document is created BUT what happens after the new document is created. Our current agent is extremely inefficient because it deletes all docs then runs something like this (except ODBCConnection...). What would I insert to update the document if already present? I'm assuming the key would be the customer # in this case (only unique ID). If no document exists with customer # then create new document. Thanks all... feels like I am close to some kind of solution. Just noticed that this sample just dims newdoc... where is the rest!?!

Dim session As New NotesSession
Dim db As notesdatabase
Set db = session.currentdatabase

Dim LcConnection As New LCConnection ("db2")
LcConnection.Database = "DBNAME"
LcConnection.Userid = "userid"
LcConnection.Password = "password"
LcConnection.Fieldnames = "STOCSNO, STOCSCL, STOCSSC, STOCSNM,..."

LcConnection.Connect

If LcConnection.isconnected Then
Print "DB CONNECTION IS OK!"
Else
Print "DB IS NOT CONNECTED!"
End If

Dim LcResultFieldList As LCFieldList
Set LcResultFieldList = New LCFieldList

Call LcConnection.Execute({SELECT XXXXXXXXX FROM YYYYYY WHERE ZZZZZ)}, LcResultFieldList)

Dim LcField1 As LCField
Dim LcField2 As LCField
Dim LcField3 As LCField
Dim LcField4 As LCField

Set LcField1 = LcResultFieldList.Lookup("XXX1")
Set LcField2 = LcResultFieldList.Lookup("XXX2")
Set LcField3 = LcResultFieldList.Lookup("XXX3")
Set LcField4 = LcResultFieldList.Lookup("XXX4")

Dim count As Long

Dim newdoc As NotesDocument

While (LcConnection.Fetch (LcResultFieldList) > 0)
count = count + 1
Print count, LcField1.Text(0), LcField2.Text(0), LcField3.Text(0)
Wend

LcConnection.Disconnect


Feedback response number WEBB7CNV2J created by ~Sanjay Umtumisonikle on 03/12/2008

DB2 Table -> Web (~Sanjay Umtumis... 12.Mar.08)
. . A question and an answer (~Lily Cisfanate... 12.Mar.08)
. . . . DB2 -> Web (iSeries) (~Sanjay Umtumis... 12.Mar.08)
. . . . . . Option? LCConnection & Draft Script... (~Sanjay Umtumis... 12.Mar.08)
. . . . . . . . Syntax (LCConnection.Execute) (~Sanjay Umtumis... 13.Mar.08)
. . . . . . You could use Virtual Fields or Vir... (~Justin Xanluve... 14.Mar.08)
. . . . . . . . LEI vs. DECS (~Sanjay Umtumis... 14.Mar.08)
. . . . . . . . . . Comments on DECS (~Justin Xanluve... 17.Mar.08)
. . . . . . . . . . . . DECS Option (DB2 -> Notes Only) (~Sanjay Umtumis... 17.Mar.08)
. . . . . . . . . . . . . . more (~Justin Xanluve... 17.Mar.08)
. . . . . . . . . . . . . . . . Thanks (re: Email) (~Sanjay Umtumis... 18.Mar.08)
. . . . . . . . . . . . . . . . Latest Script & Question (re: Nothi... (~Sanjay Umtumis... 19.Mar.08)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS